import os

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from config.config import DRIVER_PATH

def chrome():
    #实例化服务对象，指定webdriver服务路径
    service = Service(executable_path=os.path.join(DRIVER_PATH,"chromedriver.exe"))
    #实例化浏览器对象
    driver = webdriver.Chrome(service=service)
    driver.maximize_window()
    return driver

